package com.own.demo.lwf.common.performance;

/**
 * @author liwenfeng
 * @date 2022/8/12 0012
 * @apinote
 */

/**
 * @version v1.0
 * @Description:
 * @Author Administrator
 * @Date 2022/8/12 0012 21:48
 * @copyright 李文峰
 */
public class StopWatch {
    public static void main(String[] args) throws InterruptedException {
        // 创建后立即start
        org.apache.commons.lang3.time.StopWatch watch = org.apache.commons.lang3.time.StopWatch.createStarted();
        Thread.sleep(1000);
        System.out.println(watch.getTime());
        System.out.println("从开始到现在的时间为"+watch.getTime()+"ms");

    }
}
